package com.zhongge.code;

import java.util.Scanner;

/**
 * @ClassName Demo01
 * @Description TODO
 * @Author 笨忠
 * @Date 2025/9/22 22:30
 * @Version 1.0
 */
public class Demo01 {
    public static void main1(String[] args) {
        System.out.println();
    }
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        //输入单精度a 和 字符 b ==》y:需要加急  n：不需要加急
        float a = in.nextFloat();
        // String s = in.nextLine();
        //他读取了空格:所以不要使用nextLine 而是使用next
        String s = in.next();
        char b = s.charAt(0);

        if (b == 'y') {//加急
            if (a > 0 && a <= 1) {
                System.out.println(20 + 5);
            } else if(a > 1){
                float num = (20 + (a - 1)*1 + 5);
                System.out.printf("%f.0", num);
            }
        } else if(b == 'n'){//不加急
            if (a > 0 && a <= 1) {
                System.out.println(20);
            } else if(a > 1){
                float num = (20 + (a - 1)*1);
                System.out.printf("%.0f", num);
            }
        }
    }
}
